Skip to content

fix(cli): require explicit init for guidance - #343

Merged
mixelpixx merged 1 commit into
mixelpixx:mainfrom
neusse:codex/fix-nonmutating-mcp-startup
Aug 28, 2026
Merged

fix(cli): require explicit init for guidance#343
mixelpixx merged 1 commit into
mixelpixx:mainfrom
neusse:codex/fix-nonmutating-mcp-startup

Conversation

@neusse

@neusse neusse commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove the silent guidance installer from normal piped MCP startup
  • keep --client accepted and validated for command compatibility
  • document that guidance installation requires an explicit konnect init
  • regression-test clean-home and install/uninstall/start sequences for both Claude and Codex with the real CLI process

Closes #242.

Root cause and design

Server startup treated an absent .installed-{client} marker as a first launch and called the silent installer. uninstall deliberately removes that same marker, so the next MCP launch could not distinguish an explicit uninstall from a new installation and recreated the guidance.

This selects the simpler policy approved in #242: server startup performs no guidance installation at all. Installation remains available only through the explicit konnect init [--client ...] command. No tombstone or new persistent state is needed.

Compatibility and migration

  • --client claude and --client codex remain valid server arguments.
  • Existing explicit init, status, and uninstall behavior is unchanged.
  • TTY/double-click setup behavior is unchanged.
  • A fresh MCP registration no longer installs guidance implicitly; users who want bundled guidance run konnect init once.

Tests

  • cargo test --workspace --locked --lib --tests
  • cargo test --workspace --locked --doc
  • cargo clippy --workspace --locked --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • python -m unittest discover -s plugin/tests -v (KiCad 10 bundled Python)

The real-process home-directory regression runs on Linux and macOS. It is intentionally excluded on Windows because dirs::home_dir() uses SHGetKnownFolderPath there and ignores HOME/USERPROFILE; attempting to redirect it would risk the runner's real client configuration. The normal Windows unit/integration suite remains green. Live-KiCad tests retain their repository-defined ignored status.

Risk and rollback

Risk is limited to removing an implicit side effect. Rollback is the single commit, but would restore the destructive post-uninstall behavior. No file format, IPC protocol, packaging, schema, or configuration-key changes are involved.

@neusse
neusse force-pushed the codex/fix-nonmutating-mcp-startup branch from b09329b to f3b4eb6 Compare August 26, 2026 20:13
@neusse
neusse marked this pull request as ready for review August 26, 2026 20:36
@neusse
neusse force-pushed the codex/fix-nonmutating-mcp-startup branch from f3b4eb6 to 50f189a Compare August 27, 2026 20:17
@neusse

neusse commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

Release-integration note: Konnect v0.10.0 landed after this branchs earlier green CI, so the old run could not prove compatibility with the released base. I rebased onto current main and re-ran the installer/argument tests: 10 focused unit tests plus the advertised-help transaction test pass. The production behavior remains platform-independent; the real clean-home process test is still Unix-only because Windows home discovery cannot be safely redirected by that fixture. Fresh CI is now authoritative.

@neusse

neusse commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

Release 10 blind-side revalidation note: v0.10.0 changed the surrounding CLI, installer tests, and catalogue documentation after this PR was opened. This branch was rebased onto current upstream and the explicit-init/non-mutating-startup behavior was rerun against the v0.10 command surface. CI is green on Linux, Windows, and macOS.

@mixelpixx
mixelpixx merged commit af42862 into mixelpixx:main Aug 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] MCP startup silently reinstalls guidance after uninstall

2 participants